<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@page import="com.blockchain.common.enums.ZfType"%>
<%@page import="com.blockchain.front.servlets.financial.UpdatePd"%>
<%@page import="com.blockchain.front.servlets.financial.GdList"%>
<%@page import="com.blockchain.front.servlets.financial.UpdateGd"%>
<%@page import="com.blockchain.front.service.common.entity.GdEntity"%>
<%@page import="com.blockchain.front.service.financial.GdManage"%>
<%@page import="com.blockchain.common.enums.GdState"%>
<%@page import="com.blockchain.front.servlets.financial.Wygd"%>
<%@page import="java.text.DecimalFormat"%>
<%@page import="com.blockchain.util.http.URLParameter"%>
<%@page import="com.blockchain.front.service.AbstractFrontService"%>
<%@page import="com.blockchain.front.servlets.AbstractFrontServlet"%>
<%@page import="com.blockchain.front.service.financial.entity.JlEntity"%>
<%@page import="com.blockchain.common.enums.JyztStatus"%>
<html>
<head>
<%
	String str = languageDefine.getValue(request, "eurRecharge_eurRecharge");
		String _TITLE_ = str + "- " + configureProvider.getProperty(SystemVariable.SITE_NAME);
		CURRENT_SUB_CATEGORY = "RMBCZ";
		PC_TITLE_NAME = "RMBCZ";
		URLParameter parameter = new URLParameter(request, controller.getViewURI(request, Wygd.class));
		GdEntity gdEntity = (GdEntity) request.getAttribute("gdEntity");
		String type = request.getAttribute("type") == null?"-1":request.getAttribute("type").toString();
		if(gdEntity == null){
			GdManage manage = serviceSession.getService(GdManage.class);
			gdEntity = manage.get(Integer.parseInt(request.getParameter("id")));
		}
%>
<title><%=_TITLE_%></title>
<%@include file="/WEB-INF/include/meta.jsp"%>
<%@include file="/WEB-INF/include/style.jsp"%>
<%@include file="/WEB-INF/include/authenticatedSession.jsp"%>
</head>
<%@include file="/WEB-INF/include/header.jsp"%>
<div class="autobox">
	<div class="now">
		<a
			href="<%=controller.getViewURI(request, com.blockchain.front.servlets.Index.class)%>"
			class="orange"><%=languageDefine.getValue(request, "menu_home")%></a>
		&gt; <a
			href="<%=controller.getViewURI(request, com.blockchain.front.servlets.financial.index.class)%>"
			class="orange"><%=languageDefine.getValue(request, "menu_financeCenter")%>
		</a> &gt;
		<%=languageDefine.getValue(request, "eurRecharge_eurRecharge")%>
	</div>
	<div class="assets_center clear po_re zin70">
		<!--左侧菜单-->
		<div class="coin_menu">
			<div class="coin_menu_box">
				<ul>
					<li id="finance_index"><i class="coin_menu_op_0_1"></i>拍单详情</li>
				</ul>
			</div>
			<%@include file="/WEB-INF/include/financial/left.jsp"%>
		</div>
		<!--右侧内容-->
		<div class="assets_content w900 right bg_w">
			<div class="safe_center clear" style="padding-left: 0px;">
				<h1 style="margin-top: 0px; margin-bottom: 15px; line-height: 15px;"
					href="#tab1">拍单详情</h1>
				<form action="<%=controller.getURI(request, UpdatePd.class)%>" method="post" id="form" >
				<input type="hidden" name="id" value="<%=gdEntity.id%>">
				<div class="choosepaymethod">
					<div class="choosebanks" id="JKDiv_1">
						<div id="czxx" class="methodway clearfix"
							style="padding-top: 18px; display: block;">
							<div class="w_div clearfix">
								<div class="w1">剩余数量：</div>
								<div class="w2"><%=Formater.formatAmount(gdEntity.sysl)%></div>
							</div>
							<div class="w_div clearfix">
								<div class="w1">单价：</div>
								<div class="w2" id="cjdjcf"><%=Formater.formatAmount(gdEntity.gddj)%></div>
							</div>
							<div class="w_div clearfix">
								<div class="w1">最小成交数量：</div>
								<div class="w2" id="minpdsl"><%=Formater.formatAmount(gdEntity.zxcjsl)%></div>
							</div>
							<div class="w_div clearfix">
								<div class="w1">拍单数量：</div>
								<div class="w2">
								<input class="cztxinput" onkeyup="keyUpToDo1(this);this.value=this.value.replace(/[^0-9.]/g,'');"type="text" id="pdsl" name="pdsl" value="" placeholder="" style="width:160px;padding-right:30px;border-radius: 8px;text-align:right;" >
								&nbsp;<em style="color:#EA6647;"> 总价 </em><em style="color:#EA6647;" id="toRate22"></em><em style="color:#EA6647;"> CNY</em>
								</div>
							</div>
							<div class="w_div clearfix">
								<div class="w1">拍单人姓名：</div>
								<div class="w2">
								<input class="cztxinput" type="text" id="pdrxm" name="pdrxm" value="" placeholder="" style="width:160px;padding-right:30px;border-radius: 8px;text-align:right;" >
								</div>
							</div>
							<div class="w_div clearfix">
								<div class="w1">拍单人电话：</div>
								<div class="w2">
								<input class="cztxinput" type="text" id="pdrdh" name="pdrdh" value="" placeholder="" style="width:160px;padding-right:30px;border-radius: 8px;text-align:right;" >
								</div>
							</div>
							<div class="w_div clearfix">
								<div class="w1">支付方式：</div>
								<div class="w2">
									<%
										StringHelper.filterHTML(out, gdEntity.zfType.getName());
									%>
								</div>
							</div>
							<div class="w_div clearfix">
								<div class="w1">收款人姓名：</div>
								<div class="w2">
									<%
										StringHelper.filterHTML(out, gdEntity.khxm);
									%>
								</div>
							</div>
							<%if(gdEntity.zfType == ZfType.YHK && null != gdEntity.yhmc){ %>
							<div class="w_div clearfix">
								<div class="w1">银行：</div>
								<div class="w2">
									<%
										StringHelper.filterHTML(out, gdEntity.yhmc);
									%>
								</div>
								<div class="w1">省：</div>
								<div class="w2">
									<%
										StringHelper.filterHTML(out, gdEntity.sheng);
									%>
								</div>
								<div class="w1">市：</div>
								<div class="w2">
									<%
										StringHelper.filterHTML(out, gdEntity.shi);
									%>
								</div>
							</div>
							<div class="w_div clearfix">
								<div class="w1">支行名称：</div>
								<div class="w2">
									<%
										StringHelper.filterHTML(out, gdEntity.zhmc);
									%>
								</div>
							</div>
							<%}%>
							<div class="w_div clearfix">
								<div class="w1">收款账号：</div>
								<div class="w2">
									<%
										StringHelper.filterHTML(out, gdEntity.skzh);
									%>
								</div>
							</div>
							<div class="w_div clearfix">
								<div class="w1">联系电话：</div>
								<div class="w2">
									<%
										StringHelper.filterHTML(out, gdEntity.lxdh);
									%>
								</div>
							</div>
							<div class="w_div clearfix">
								<div class="w1">挂单时间：</div>
								<div class="w2"><%=DateTimeParser.format(gdEntity.gdsj, "yyyy-MM-dd HH:mm")%></div>
							</div>
						</div>
						<em style="padding-left:80px;color:#EA6647;"> 温馨提示：拍下订单后，请30分钟内付款，付款完成后请点击已付款，超时未付款则自动取消订单。 </em>
						<div class="w_div clearfix" style="margin-top:20px;padding-left:220px">
							<div class="w1">
								<a href="<%=controller.getURI(request, GdList.class)%>"><input
									type="button" class="btn-cztx" id="btn-submit" value='返回'
									title='返回' style="border-radius: 8px;"></a>
							</div>
							<%
								if (gdEntity.gdState == GdState.GDZ) {
							%>
							<div class="w2">
								<input type="hidden" name="gdState" value="YPX"> <input
									type="button" class="btn-cztx" id="btn-submit" value='确认拍下'
									title='确认拍下' onclick="Update();" style="border-radius: 8px;">
							</div>
							<%
								} else if (gdEntity.gdState == GdState.YPX && type.equals("1")) {
							%>
							<div class="w2">
								<input type="hidden" name="gdState" value="GDZ"> <input
									type="button" class="btn-cztx" id="btn-submit" value='取消拍单'
									title='取消拍单' onclick="Update();" style="border-radius: 8px;">
							</div>
							
							<%
								} else if (gdEntity.gdState == GdState.YFK && type.equals("1")) {
							%>
							<div class="w2">
								<input type="hidden" name="gdState" value="SSZ"> <input
									type="button" class="btn-cztx" id="btn-submit" value='申诉订单'
									title='申诉订单' onclick="Update();" style="border-radius: 8px;">
							</div>
							<%
								} else if (gdEntity.gdState == GdState.SSZ && type.equals("1")) {
							%>
							<div class="w2">
								<input type="hidden" name="gdState" value="YFK"> <input
									type="button" class="btn-cztx" id="btn-submit" value='取消申诉'
									title='取消申诉' onclick="Update();" style="border-radius: 8px;">
							</div>
							<%
								} else if (gdEntity.gdState == GdState.YPX && type.equals("2")) {
							%>
							<div class="w2">
								<input type="hidden" name="gdState" value="YFK"> <input
									type="button" class="btn-cztx" id="btn-submit" value='已付款'
									title='已付款' onclick="Update();" style="border-radius: 8px;">
							</div>
							<%
								}
							%>
						</div>
					</div>
				</div>
			</div>
			 </form>
		</div>
	</div>
</div>

<%@include file="/WEB-INF/include/footer.jsp"%>
<%@include file="/WEB-INF/include/script.jsp"%>
<script type="text/javascript">
	function Update() {
        $("#form").submit(); 
	 }
	   
	function myczHuikuan(){
		$("#dialog_ali").hide();
		$("#czxx").show();	
	}
	function keyUpToDo1(obj){
		var value=obj.value.replace(/[^0-9.]/g,'');
		obj.value=value;
		value=value.replace(/\.\d{6,}$/,value.substr(value.indexOf('.'),7));
		if(value==""){
			$("#toRate22").text(0.00);
		}else{
			var value1 = $("#cjdjcf").html();
			var reg = new RegExp(",","g");
			value1 = value1.replace(reg,"");
			$("#toRate22").text(value1*value);
		}
	}
	
<%String error = controller.getPrompt(request, response, PromptLevel.ERROR);
				if (!StringHelper.isEmpty(error)) {%>
	layer.open({
	title: '<%=languageDefine.getValue(request, "js_tip")%>',
	content: '<%=error%>'
	});
<%}%>
	
<%-- <%String info = controller.getPrompt(request, response, PromptLevel.INFO);
				if (!StringHelper.isEmpty(info)) {%>
						$("#dialog_ali").show();
						$("#czxx").hide();
				<%}%> --%>
	
</script>
</body>
</html>

